// @import "src/styles/base/fn";
.mui-switch {
    appearance: none;
}

.mui-switch,
.mui-switch__box {
    position: relative;
    width: px2rem(102);
    height: px2rem(62);
    outline: 0;
    border: none;
    border-radius: px2rem(36);
    box-sizing: border-box;
    background-color: $bgColorDefault;
    transition: background-color .1s, border .1s;
    &:before {
        content: " ";
        position: absolute;
        top: 0;
        left: 0;
        width: px2rem(102);
        height: px2rem(62);
        border-radius: px2rem(36);
        background-color: $bgColorDefault;
        transition: transform .35s cubic-bezier(0.45, 1, 0.4, 1);
    }
    &:after {
        content: " ";
        position: absolute;
        top: px2rem(4);
        left: 2px;
        width: px2rem(54);
        height: px2rem(54);
        border-radius: 50%;
        background-color: #FFFFFF;
        transition: transform .35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
    }
}

// .mui-switch:checked,
// .mui-switch__input:checked~
.mui-switch__box_checked {
    background-color: $colorPrimary;
    &:before {
        transform: scale(0);
    }
    &:after {
        transform: translateX(px2rem(40));
    }
}

// 兼容IE Edge的版本
.mui-switch__input {
    position: absolute;
    left: -9999px;
}

.mui-switch__box {
    display: block;
}
